import { ObjectType } from '../types';
import { BaseInsertDto, BaseUpdateDto } from './.dto';

/** 地址列表DTO */
export class AddressListDto implements ObjectType {
  id: string = '';
  address: string = '';
  city: string = '';
  district: string = '';
  isDefault: boolean = false;
  province: string = '';
  receiverName: string = '';
  receiverPhone: string = '';
}

/** 地址单个DTO */
export class AddressSingleDto implements ObjectType {
  id: string = '';
  address: string = '';
  city: string = '';
  district: string = '';
  isDefault: boolean = false;
  province: string = '';
  receiverName: string = '';
  receiverPhone: string = '';
}

/** 地址创建DTO */
export class AddressCreateDto extends BaseInsertDto{
  remark?: string | undefined;
  version?: any;
  address: string = '';
  city: string = '';
  district: string = '';
  isDefault: boolean = false;
  province: string = '';
  receiverName: string = '';
  receiverPhone: string = '';
}

/** 地址更新DTO */
export class AddressUpdateDto extends BaseUpdateDto{
  address: string = '';
  city: string = '';
  district: string = '';
  isDefault: boolean = false;
  province: string = '';
  receiverName: string = '';
  receiverPhone: string = '';
}

/**
 * @swagger
 * components:
 *   schemas:
 *     AddressListDto:
 *       type: object
 *       properties:
 *         id:
 *           type: integer
 *           description: 地址的唯一标识符
 *           example: 1
 *         address:
 *           type: string
 *           description: 详细地址
 *           example: '123 Main St'
 *         city:
 *           type: string
 *           description: 城市
 *           example: '北京'
 *         district:
 *           type: string
 *           description: 区县
 *           example: '朝阳区'
 *         isDefault:
 *           type: boolean
 *           description: 是否为默认地址
 *           example: true
 *         province:
 *           type: string
 *           description: 省份
 *           example: '北京市'
 *         receiverName:
 *           type: string
 *           description: 收货人姓名
 *           example: '张三'
 *         receiverPhone:
 *           type: string
 *           description: 收货人电话
 *           example: '13800138000'
 *     AddressSingleDto:
 *       allOf:
 *         - $ref: '#/components/schemas/AddressListDto'
 *     AddressCreateDto:
 *       type: object
 *       properties:
 *         address:
 *           type: string
 *           description: 详细地址
 *           example: '123 Main St'
 *         city:
 *           type: string
 *           description: 城市
 *           example: '北京'
 *         district:
 *           type: string
 *           description: 区县
 *           example: '朝阳区'
 *         isDefault:
 *           type: boolean
 *           description: 是否为默认地址
 *           example: true
 *         province:
 *           type: string
 *           description: 省份
 *           example: '北京市'
 *         receiverName:
 *           type: string
 *           description: 收货人姓名
 *           example: '张三'
 *         receiverPhone:
 *           type: string
 *           description: 收货人电话
 *           example: '13800138000'
 *     AddressUpdateDto:
 *       type: object
 *       properties:
 *         address:
 *           type: string
 *           description: 详细地址
 *           example: '123 Main St'
 *         city:
 *           type: string
 *           description: 城市
 *           example: '北京'
 *         district:
 *           type: string
 *           description: 区县
 *           example: '朝阳区'
 *         isDefault:
 *           type: boolean
 *           description: 是否为默认地址
 *           example: true
 *         province:
 *           type: string
 *           description: 省份
 *           example: '北京市'
 *         receiverName:
 *           type: string
 *           description: 收货人姓名
 *           example: '张三'
 *         receiverPhone:
 *           type: string
 *           description: 收货人电话
 *           example: '13800138000'
 */
